package vip.sweet.biz.modular.cultural.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.cultural.entity.BizCulturalContentDetails;
import vip.sweet.biz.modular.cultural.mapper.BizCulturalContentDetailsMapper;
import vip.sweet.biz.modular.cultural.params.BizCulturalContentDetailsAddParams;
import vip.sweet.biz.modular.cultural.service.BizCulturalContentDetailsService;

/**
 * @author ASUS
 * @Date 2025/10/4 23:57
 * @Descripition
 */
@Service
public class BizCulturalContentDetailsServiceImpl extends ServiceImpl<BizCulturalContentDetailsMapper, BizCulturalContentDetails> implements BizCulturalContentDetailsService {
    @Override
    public boolean add(BizCulturalContentDetailsAddParams addCulturalContentDetailsParams) {
        if (ObjectUtil.isNotEmpty(addCulturalContentDetailsParams))
            return save(BeanUtil.toBean(addCulturalContentDetailsParams, BizCulturalContentDetails.class));
        return false;
    }
}
